# -*- coding: utf-8 -*-
"""
Created on Tue May  6 08:40:33 2025
    求治愈人数
@author: Bradley
"""
def Cure(d):
    m = 1                     # 第15天第1个出院
    i = 0
    for _ in range(20,d,5):   # 10天一循环
        i += 1
        dayOut = 3**i
        if dayOut<1000:
            m = dayOut
        else:
            m += 1000*5       # 改为每天出院人员
    print('%d 天共出院人数 %d'%(d,m))
Cure(31)
Cure(61)